<%@page import="com.ykfk.cngrain.tbw.model.TbManager"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
TbManager tbManager = (TbManager)request.getAttribute("user");
String user = tbManager.getFullname();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>中央政策性粮油竞价销售资金结算系统</title>
    <link href="${pageContext.request.contextPath}/res/css/login/Loading.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath}/res/css/login/css.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath}/res/js/ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath}/res/css/platform/Stylepop.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">rootsid = "0";</script>
    <script src="${pageContext.request.contextPath}/res/js/ext/adapter/ext/ext-base.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/res/js/ext/ext-all.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/res/js/ALLEvents.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/res/js/common/common.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/res/js/common/Dialog.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/res/js/Main.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/res/js/cAlert.js" type="text/javascript"></script>
    <%@ include file="/common.jsp"%>
    <script type="text/javascript">
        //关闭显示层
        function closeMask2() {
            document.getElementById('selectDiv').style.display = 'none';
            closeMask();
        }
        function ifOpen() {//切换用户
            var iframeSrc = '${pageContext.request.contextPath}/cutUser.jsp';
            cAlertT(iframeSrc, '425', '200');
        }
        //滚动插件
        (function($) {
            $.fn.extend({
                Scroll: function(opt, callback) {
                    //参数初始化
                    if (!opt) var opt = {};
                    var _this = this.eq(0).find("ul:first");
                    var lineH = _this.find("li:first").height(), //获取行高
                        line = opt.line ? parseInt(opt.line, 10) : parseInt(this.height() / lineH, 10), //每次滚动的行数，默认为一屏，即父容器高度
                        speed = opt.speed ? parseInt(opt.speed, 10) : 500, //卷动速度，数值越大，速度越慢（毫秒）
                        timer = opt.timer ? parseInt(opt.timer, 10) : 3000; //滚动的时间间隔（毫秒）
                    if (line == 0) line = 1;
                    var upHeight = 0 - line * lineH;
                    //滚动函数
                    scrollUp = function() {
                        _this.animate({
                            marginTop: upHeight
                        }, speed, function() {
                            for (i = 1; i <= line; i++) {
                                _this.find("li:first").appendTo(_this);
                            }
                            _this.css({ marginTop: 0 });
                        });
                    }
                    //鼠标事件绑定
                    _this.hover(function() {
                        clearInterval(timerID);
                    }, function() {
                        timerID = setInterval("scrollUp()", timer);
                    }).mouseout();
                }
            })
        })(jQuery);

        $(document).ready(function() {
            $("#scrollDiv").Scroll({ line: 1, speed: 1000, timer: 3000 });
            west.title = ( '<font color="red"><b><%= user %></b></font>');
        });
        
        function closewin(){
    		jConfirm('你确定要<strong>退出</strong>系统？', '系统提示', function(data) {
    			if(data){
    				location.href = '${pageContext.request.contextPath}/logout.jsp';
    			}
    		});
    	}
    </script>

</head>
<body>
    <form id="form1">
    <input id="indexValue" type="hidden" value="0" />
    <div id="top">
        <table style="width: 100%;" cellpadding="0" cellspacing="0">
            <tr>
                <td style="overflow: hidden;">
                    <ul class="floatleft" style="overflow: hidden;">
                        <li class="floatleft">
                            <img alt="中储粮资金结算系统" src="${pageContext.request.contextPath}/res/images/framework/images/logo.jpg" height="60" /></li>
                    </ul>
                </td>
                <td style="width: 500px;">
                    <ul class="floatright" style="width: 500px;">
                    	<li class="floatright" id="divCollapse"><a href="javascript:void(0);" onmouseover="imgCollapse1.src='${pageContext.request.contextPath}/res/images/head/02.gif';"
                            onmouseout="imgCollapse1.src='${pageContext.request.contextPath}/res/images/head/01.gif';" onclick="north.collapse(true);setindex(2);">
                            <img id="imgCollapse1" src="${pageContext.request.contextPath}/res/images/head/01.gif" border="0" /></a></li>
                        <li class="floatright" id="divExpand" style="display: none;"><a href="javascript:void(0);"
                            onmouseover="imgCollapse2.src='${pageContext.request.contextPath}/res/images/head/04.gif';" onmouseout="imgCollapse2.src='${pageContext.request.contextPath}/res/images/head/03.gif';"
                            onclick="north.expand(true);setindex(1);">
                            <img id="imgCollapse2" src="${pageContext.request.contextPath}/res/images/head/03.gif" border="0" /></a></li>
                        <li class="floatright"><a href="javascript:void(0);" onclick="closewin()">
                            <img alt="退出系统" src="${pageContext.request.contextPath}/res/images/framework/images/topan03.jpg" width="90" height="60"
                                border="0" /></a></li>
                        <li class="floatright"><a href="javascript:void(0);" onclick="ifOpen();">
                            <img alt="切换用户" src="${pageContext.request.contextPath}/res/images/framework/images/topan01.jpg" width="90" height="60"
                                border="0" /></a></li>
                        <li class="floatright topybg">
                            <div id="scrollDiv"></div>
                            <div class="date"> 当前用户：<span id="lbUser" style="font-weight:bold;"><%= user %></span></div>
                        </li>
                    </ul>

                    <script type="text/javascript">
                        function setindex(index) {
                            if (index == 1) {
                                document.getElementById('divCollapse').style.display = '';
                                document.getElementById('divExpand').style.display = 'none';
                            }
                            else {
                                document.getElementById('divCollapse').style.display = 'none';
                                document.getElementById('divExpand').style.display = '';
                            }
                        }
                    </script>
                </td>
            </tr>
        </table>
        <div class="clear"></div>
    </div>
    <div style="display: block; padding-top: 5px;" id="botton" class="bottonall">
        <b>技术支持：郑州华粮科技股份有限公司&nbsp;&nbsp; TEL：(0371)68085212、68085207</b>
    </div>
    </form>
</body>
</html>